<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>tdl._MetaConsole</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="tdl-module.html">Package&nbsp;tdl</a> ::
        Class&nbsp;_MetaConsole
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="tdl._MetaConsole-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class _MetaConsole</h1><p class="nomargin-top"><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole">source&nbsp;code</a></span></p>
<pre class="base-tree">
object --+
         |
        <strong class="uidshort">_MetaConsole</strong>
</pre>

<dl><dt>Known Subclasses:</dt>
<dd>
      <ul class="subclass-list">
<li><a href="tdl.Console-class.html">Console</a></li><li>, <a href="tdl.Window-class.html">Window</a></li>  </ul>
</dd></dl>

<hr />
<p>Contains methods shared by both the <a href="tdl.Console-class.html" 
  class="link">Console</a> and <a href="tdl.Window-class.html" 
  class="link">Window</a> classes.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Instance Methods</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__contains__"></a><span class="summary-sig-name">__contains__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">position</span>)</span><br />
      Use ((x, y) in console) to check if a position is drawable on this 
      console.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.__contains__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#blit" class="summary-sig-name">blit</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">source</span>,
        <span class="summary-sig-arg">x</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">y</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">width</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">height</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">srcX</span>=<span class="summary-sig-default">0</span>,
        <span class="summary-sig-arg">srcY</span>=<span class="summary-sig-default">0</span>)</span><br />
      Blit another console or Window onto the current console.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.blit">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#drawChar" class="summary-sig-name">drawChar</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">char</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Draws a single character.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawChar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#drawFrame" class="summary-sig-name">drawFrame</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">width</span>,
        <span class="summary-sig-arg">height</span>,
        <span class="summary-sig-arg">string</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Similar to <a href="tdl._MetaConsole-class.html#drawRect" 
      class="link">drawRect</a> but only draws the outline of the 
      rectangle.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawFrame">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#drawRect" class="summary-sig-name">drawRect</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">width</span>,
        <span class="summary-sig-arg">height</span>,
        <span class="summary-sig-arg">string</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Draws a rectangle starting from x and y and extending to width and 
      height.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawRect">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#drawStr" class="summary-sig-name">drawStr</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>,
        <span class="summary-sig-arg">string</span>,
        <span class="summary-sig-arg">fgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="summary-sig-arg">bgcolor</span>=<span class="summary-sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span><br />
      Draws a string starting at x and y.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawStr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">(int, (r, g, b), (r, g, b))</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#getChar" class="summary-sig-name">getChar</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      Return the character and colors of a tile as (ch, fg, bg)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.getChar">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">(int, int)</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="getSize"></a><span class="summary-sig-name">getSize</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Return the size of the console as (width, height)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.getSize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="tdl._MetaConsole-class.html#scroll" class="summary-sig-name">scroll</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x</span>,
        <span class="summary-sig-arg">y</span>)</span><br />
      Scroll the contents of the console in the direction of x,y.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.scroll">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__init__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Properties</span></td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="console"></a><span class="summary-name">console</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="height"></a><span class="summary-name">height</span>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="width"></a><span class="summary-name">width</span>
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td align="left" colspan="2" class="table-header">
    <span class="table-header">Method Details</span></td>
</tr>
</table>
<a name="blit"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">blit</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">source</span>,
        <span class="sig-arg">x</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">y</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">width</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">height</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">srcX</span>=<span class="sig-default">0</span>,
        <span class="sig-arg">srcY</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.blit">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Blit another console or Window onto the current console.</p>
  <p>By default it blits the entire source to the topleft corner.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>source</code></strong> (<a href="tdl.Console-class.html" class="link">Console</a> or <a 
          href="tdl.Window-class.html" class="link">Window</a>) - Source window can be a <a href="tdl.Console-class.html" 
          class="link">Console</a> or <a href="tdl.Window-class.html" 
          class="link">Window</a> instance. It can even blit to itself 
          without any problems.</li>
        <li><strong class="pname"><code>x</code></strong> (int) - X coordinate to blit to.</li>
        <li><strong class="pname"><code>y</code></strong> (int) - Y coordinate to blit to.</li>
        <li><strong class="pname"><code>width</code></strong> (int or None) - Width of the rectangle.
          <p>Can be None to extend as far as possible to the bottom right 
          corner of the blit area or can be a negative number to be sized 
          reltive to the total size of the <b>destination</b> console.</p></li>
        <li><strong class="pname"><code>height</code></strong> (int or None) - Height of the rectangle.  See width.</li>
        <li><strong class="pname"><code>srcX</code></strong> (int) - The source consoles x coordinate to blit from.</li>
        <li><strong class="pname"><code>srcY</code></strong> (int) - The source consoles y coordinate to blit from.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="drawChar"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drawChar</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">char</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawChar">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Draws a single character.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> (int) - X coordinate to draw at.</li>
        <li><strong class="pname"><code>y</code></strong> (int) - Y coordinate to draw at.</li>
        <li><strong class="pname"><code>char</code></strong> (int, string, or None) - Should be an integer, single character string, or None.
          <p>You can set the char parameter as None if you only want to 
          change the colors of the tile.</p></li>
        <li><strong class="pname"><code>fgcolor</code></strong> ((r, g, b) or None) - For fgcolor and bgcolor you use a 3 item list with integers 
          ranging 0-255 or None.
          <p>None will keep the current color at this position 
          unchanged.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> ((r, g, b) or None) - Background color.  See fgcolor</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AssertionError</strong></code> - Having x or y values that can't be placed inside of the console 
        will raise an AssertionError. You can use always use ((x, y) in 
        console) to check if a tile is drawable.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="drawFrame"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drawFrame</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">width</span>,
        <span class="sig-arg">height</span>,
        <span class="sig-arg">string</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawFrame">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Similar to <a href="tdl.Window-class.html#drawRect" 
  class="link">drawRect</a> but only draws the outline of the 
  rectangle.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> (int) - x coordinate to draw at.</li>
        <li><strong class="pname"><code>y</code></strong> (int) - y coordinate to draw at.</li>
        <li><strong class="pname"><code>width</code></strong> (int or None) - Width of the rectangle.
          <p>Can be None to extend to the bottom right of the console or 
          can be a negative number to be sized reltive to the total size of
          the console.</p></li>
        <li><strong class="pname"><code>height</code></strong> (int or None) - Height of the rectangle.  See width.</li>
        <li><strong class="pname"><code>string</code></strong> (int, string, or None) - Should be an integer, single character string, or None.
          <p>You can set the char parameter as None if you only want to 
          change the colors of an area.</p></li>
        <li><strong class="pname"><code>fgcolor</code></strong> ((r, g, b) or None) - For fgcolor and bgcolor you use a 3 item list with integers 
          ranging 0-255 or None.
          <p>None will keep the current color at this position 
          unchanged.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> ((r, g, b) or None) - Background color.  See fgcolor</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AssertionError</strong></code> - Having x or y values that can't be placed inside of the console 
        will raise an AssertionError.
        <p>You can use always use ((x, y) in console) to check if a tile is
        drawable.</p></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="drawRect"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drawRect</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">width</span>,
        <span class="sig-arg">height</span>,
        <span class="sig-arg">string</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawRect">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Draws a rectangle starting from x and y and extending to width and 
  height.</p>
  <p>If width or height are None then it will extend to the edge of the 
  console.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> (int) - x coordinate to draw at.</li>
        <li><strong class="pname"><code>y</code></strong> (int) - y coordinate to draw at.</li>
        <li><strong class="pname"><code>width</code></strong> (int or None) - Width of the rectangle.
          <p>Can be None to extend to the bottom right of the console or 
          can be a negative number to be sized reltive to the total size of
          the console.</p></li>
        <li><strong class="pname"><code>height</code></strong> (int or None) - Height of the rectangle.  See width.</li>
        <li><strong class="pname"><code>string</code></strong> (int, string, or None) - Should be an integer, single character string, or None.
          <p>You can set the char parameter as None if you only want to 
          change the colors of an area.</p></li>
        <li><strong class="pname"><code>fgcolor</code></strong> ((r, g, b) or None) - For fgcolor and bgcolor you use a 3 item list with integers 
          ranging 0-255 or None.
          <p>None will keep the current color at this position 
          unchanged.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> ((r, g, b) or None) - Background color.  See fgcolor</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AssertionError</strong></code> - Having x or y values that can't be placed inside of the console 
        will raise an AssertionError.
        <p>You can use always use ((x, y) in console) to check if a tile is
        drawable.</p></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="drawStr"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">drawStr</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>,
        <span class="sig-arg">string</span>,
        <span class="sig-arg">fgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>255<code class="variable-op">, </code>255<code class="variable-op">, </code>255<code class="variable-group">)</code></span>,
        <span class="sig-arg">bgcolor</span>=<span class="sig-default"><code class="variable-group">(</code>0<code class="variable-op">, </code>0<code class="variable-op">, </code>0<code class="variable-group">)</code></span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.drawStr">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Draws a string starting at x and y.  Optinally colored.</p>
  <p>A string that goes past the right side will wrap around.  A string 
  wraping to below the console will raise a <a 
  href="tdl.TDLError-class.html" class="link">TDLError</a> but will still 
  be written out.  This means you can safely ignore the errors with a 
  try... except block if you're fine with partily written strings.</p>
  <p>\r and \n are drawn on the console as normal character tiles.  No 
  special encoding is done and any string will translate to the character 
  table as is.</p>
  <p>For a string drawing operation that respects special characters see 
  the <a href="tdl.Typewriter-class.html" class="link">Typewriter</a> 
  class.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> (int) - X coordinate to draw at.</li>
        <li><strong class="pname"><code>y</code></strong> (int) - Y coordinate to draw at.</li>
        <li><strong class="pname"><code>string</code></strong> (string or iterable) - Can be a string or an iterable of numbers.
          <p>Special characters are ignored and rendered as any other 
          character.</p></li>
        <li><strong class="pname"><code>fgcolor</code></strong> ((r, g, b) or None) - For fgcolor and bgcolor you use a 3 item list with integers 
          ranging 0-255 or None.
          <p>None will keep the current color at this position 
          unchanged.</p></li>
        <li><strong class="pname"><code>bgcolor</code></strong> ((r, g, b) or None) - Background color.  See fgcolor</li>
    </ul></dd>
    <dt>Raises:</dt>
    <dd><ul class="nomargin-top">
        <li><code><strong class='fraise'>AssertionError</strong></code> - Having x or y values that can't be placed inside of the console 
        will raise an AssertionError.
        <p>You can use always use ((x, y) in console) to check if a tile is
        drawable.</p></li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="getChar"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">getChar</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.getChar">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Return the character and colors of a tile as (ch, fg, bg)</p>
  <p>This method runs very slowly as is not recommended to be called 
  frequently.</p>
  <dl class="fields">
    <dt>Returns: (int, (r, g, b), (r, g, b))</dt>
        <dd>Returns a 3-item tuple.  The first item is an integer of the 
          character at the position (x, y) the second and third are the 
          foreground and background colors respectfully.</dd>
  </dl>
</td></tr></table>
</div>
<a name="scroll"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">scroll</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x</span>,
        <span class="sig-arg">y</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="tdl-pysrc.html#_MetaConsole.scroll">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Scroll the contents of the console in the direction of x,y.</p>
  <p>Uncovered areas will be cleared.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>x</code></strong> (int) - Distance to scroll along x-axis</li>
        <li><strong class="pname"><code>y</code></strong> (int) - Distance to scroll along y-axis</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="tdl-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-tdl/">python-tdl</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    <a href="epydoc-log.html">Generated by Epydoc
    3.0.1 on Wed Dec 05 20:07:32 2012</a>
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
